package com.jhgsys.internal.base.factory.enums;

import lombok.Getter;

/**
 * 业务通知对象字典
 * @author fenghaijun
 */
public enum NoticeObjectEnums {

    //事故调查分配通知
    ACCIDENT_SURVEY_ASSIGNMENT("1","事故调查分配通知"),

    //事故整改分配通知
    ACCIDENT_RECTIFICATION_ASSIGNMENT("2","事故整改分配通知"),




    ACCIDENT_OTHER("0","未知通知对象");
    @Getter
    private final String value;

    @Getter
    private final String label;

    NoticeObjectEnums(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public static NoticeObjectEnums getNoticeObjectByValue(String value){
        for (NoticeObjectEnums constants : values()) {
            if (constants.getValue() == value) {
                return constants;
            }
        }
        return ACCIDENT_OTHER;
    }
}
